<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增商品订单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-commodityorder-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>支付方式：</label>
                <div class="col-sm-8">
                    <select name="orderWay" class="form-control m-b" th:with="type=${@dict.getType('t_order_way')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>订单金额：</label>
                <div class="col-sm-8">
                    <input name="orderMoney" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>支付金额：</label>
                <div class="col-sm-8">
                    <input name="orderMoenyPay" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>优惠金额：</label>
                <div class="col-sm-8">
                    <input name="orderMoenyDis" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>订单状态：</label>
                <div class="col-sm-8">
                    <select name="orderStatus" class="form-control m-b" th:with="type=${@dict.getType('t_order_status')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>退款状态：</label>
                <div class="col-sm-8">
                    <select name="orderRefundStatus" class="form-control m-b" th:with="type=${@dict.getType('t_order_refund_status')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单备注：</label>
                <div class="col-sm-8">
                    <input name="orderRemarks" class="form-control" type="text" maxlength="100">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户姓名：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text" required maxlength="10">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户电话：</label>
                <div class="col-sm-8">
                    <input name="userPhone" class="form-control" type="text" required maxlength="11">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户地址：</label>
                <div class="col-sm-8">
                    <input name="userAddress" class="form-control" type="text" required maxlength="50">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品id：</label>
                <div class="col-sm-8">
                    <input name="commodityId" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品数量：</label>
                <div class="col-sm-8">
                    <input name="commodityCount" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发货状态：</label>
                <div class="col-sm-8">
                    <select name="deliverStatus" class="form-control m-b" th:with="type=${@dict.getType('t_deliver_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发货时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="deliverTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货状态：</label>
                <div class="col-sm-8">
                    <select name="receivingStatus" class="form-control m-b" th:with="type=${@dict.getType('t_receiving_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="receivingTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">快递类型：</label>
                <div class="col-sm-8">
                    <select name="expressType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">快递单号：</label>
                <div class="col-sm-8">
                    <input name="expressNumber" class="form-control" type="text" maxlength="26">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>失效时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="invalidTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="payTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户id：</label>
                <div class="col-sm-8">
                    <input name="userId" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>商户id：</label>
                <div class="col-sm-8">
                    <input name="merchantId" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">操作备注：</label>
                <div class="col-sm-8">
                    <input name="updateRemarks" class="form-control" type="text" maxlength="50">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "bussiness/commodityorder"
        $("#form-commodityorder-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-commodityorder-add').serialize());
            }
        }

        $("input[name='deliverTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='receivingTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='invalidTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='payTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>